import { Button,theme } from "antd";
import { useNavigate } from "react-router-dom";
import {goto} from "@/api/index"
import "@/style/home.scss"

const { useToken } = theme;
function Home(_props:any) {
    const {token} = useToken();
    const navigate = useNavigate();
    const goHome = () => {
        navigate('/login')
    }
    return (
        <div className="homeBox">
            <span style={{color: token.colorText}}>Home Page</span>
            <Button type="primary" variant="solid" onClick={() => goto('#/login')}>组件外跳转</Button>
            <Button type="primary" variant="solid" onClick={goHome}>返回登录</Button>
        </div>
    );
}

export default Home